package com.tz.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component//当前类时组件
public class ClassA {

    private ClassB b;
    private InterfaceC c;
    private ClassD d;

    @Autowired
    public ClassA(ClassB b, InterfaceC c, ClassD d) {
        this.b = b;
        this.c = c;
        this.d = d;
    }

    public void a(){
        System.out.println("a()逻辑执行...");
        b.b();
        c.c();
        d.d();
    }
}
